import request from '@/utils/request'
import qs from 'qs'
export function login (data: object) {
  return request({
    url: '/front/user/login',
    method: 'post',
    data: qs.stringify(data)
  })
}

/** 获取用户信息 */
export function getUserInfo () {
  return request({
    url: '/front/user/getInfo',
    method: 'get'
  })
}

// 刷新token
export function refreshToken (refreshtoken: string) {
  return request({
    url: '/front/user/refresh_token',
    method: 'post',
    data: { refreshtoken }
  })
}
